<?php
@session_start();

include "../../../jerimum/classes/bd.php";
include "../../../jerimum/classes/perguntas.php";
include "../../../jerimum/classes/clientes.php";

$_per	= new perguntas(); #CLASSES
$_cli 	= new clientes();


$_per->id		= $_GET["pergunta"];
$sql_resposta	= mysql_fetch_array(mysql_query("select * from anuncio_resposta WHERE id_pergunta = '".$_GET["pergunta"]."'"));
$pergunta		= $_per->pega();
$cliente		= $_cli->pega($pergunta["idcliente"]);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pergunta: <?=htmlentities($pergunta['pergunta'])?></title>
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Geneva, sans-serif;
	color: #333;
}
-->
</style></head>

<body>

<form action="cad-resposta.php" method="post">
<input type="hidden" name="id" value="<?=$pergunta['id']?>" />
<input type="hidden" name="id_anuncio" value="<?=$pergunta['id_anuncio']?>" />
<input type="hidden" name="id_cliente" value="<?=$pergunta['id_cliente']?>" />
<div style="width:98%; height:auto; margin:0px auto; background:#F0F0F0; padding:5px">
  <div id="review_body">
  <strong>Pergunta:</strong> <?=htmlentities($pergunta['pergunta'])?>
    <p>
       <strong>Resposta:
       </strong><br />
       <textarea name="resposta" id="resposta" cols="45" rows="5"><?=$sql_resposta['resposta']?></textarea>
<br />
      <img src="http://i.pgcdn.com/images/spacer.gif" width="11" height="1" /></p>
</div>


<input name="Reset" type="button" class="gh-btn" id="button" value="Cancelar" style="background-color:#333333; color:#FFFFFF; cursor:pointer" onclick="javascript:window.close();" />
<input name="Submit" type="submit" class="gh-btn" id="button2" value="Responder" style="background-color:#090; color:#FFFFFF; cursor:pointer" />
</div>
</form>
</body>
</html>